/**
 * already frozen ! ! !
 */

const done_document = {
  createCDATASection: function (data: string): CDATASection {
    throw new Error('Function not implemented.');
  },
  createComment: function (data: string): Comment {
    throw new Error('Function not implemented.');
  },
  createTextNode: function (data: string): Text {
    throw new Error('Function not implemented.');
  },
  createDocumentFragment: function (): DocumentFragment {
    throw new Error('Function not implemented.');
  },
  createElement: function <K extends keyof HTMLElementTagNameMap>(
    tagName: K,
    options?: ElementCreationOptions | undefined
  ): HTMLElementTagNameMap[K] {
    throw new Error('Function not implemented.');
  },
  createElementNS: function (namespace: 'http://www.w3.org/1999/xhtml', qualifiedName: string): HTMLElement {
    throw new Error('Function not implemented.');
  },
  createAttribute: function (localName: string): Attr {
    throw new Error('Function not implemented.');
  },
  createAttributeNS: function (namespace: string | null, qualifiedName: string): Attr {
    throw new Error('Function not implemented.');
  },
  body: undefined,
  doctype: null,
  documentElement: undefined,
  head: undefined,

  forms: undefined,
  images: undefined,
  scripts: undefined,
  links: undefined,
  embeds: undefined,
  plugins: undefined,

  adoptNode: function () {
    throw new Error('Function not implemented.');
  },
  importNode: function () {
    throw new Error('Function not implemented.');
  },
  getElementsByName: function (elementName: string): NodeListOf<HTMLElement> {
    throw new Error('Function not implemented.');
  },
};
const done_element_char = {
  nextElementSibling: null,
  previousElementSibling: null,
};

const done_element_char_doctype = {
  after: function (...params: (string | Node)[]): void {
    throw new Error('Function not implemented.');
  },
  before: function (...params: (string | Node)[]): void {
    throw new Error('Function not implemented.');
  },
  remove: function (): void {
    throw new Error('Function not implemented.');
  },
  replaceWith: function (...nodes: (string | Node)[]): void {
    throw new Error('Function not implemented.');
  },
};

const done_window = {
  screen: undefined,
  screenLeft: 0,
  screenTop: 0,
  screenX: 0,
  screenY: 0,

  innerHeight: 0,
  innerWidth: 0,
  outerHeight: 0,
  outerWidth: 0,

  pageXOffset: 0, // 相当于scrollX
  pageYOffset: 0, // 相当于scrollY
  scrollX: 0,
  scrollY: 0,

  moveBy: function (x: number, y: number): void {
    throw new Error('Function not implemented.');
  },
  moveTo: function (x: number, y: number): void {
    throw new Error('Function not implemented.');
  },
  resizeBy: function (x: number, y: number): void {
    throw new Error('Function not implemented.');
  },
  resizeTo: function (width: number, height: number): void {
    throw new Error('Function not implemented.');
  },

  visualViewport: null,
};

const done_element = {
  insertAdjacentElement: function (where: InsertPosition, element: Element): Element | null {
    throw new Error('Function not implemented.');
  },
  insertAdjacentHTML: function (position: InsertPosition, text: string): void {
    throw new Error('Function not implemented.');
  },
  insertAdjacentText: function (where: InsertPosition, data: string): void {
    throw new Error('Function not implemented.');
  },

  innerHTML: '',
  outerHTML: '',
  clientHeight: 0,
  clientWidth: 0,
  scrollHeight: 0,
  scrollWidth: 0,

  scrollLeft: 0,
  scrollTop: 0,
  clientLeft: 0,
  clientTop: 0,

  getBoundingClientRect: function (): DOMRect {
    throw new Error('Function not implemented.');
  },
  getClientRects: function (): DOMRectList {
    throw new Error('Function not implemented.');
  },

  attributes: undefined,
  getAttribute: function (qualifiedName: string): string | null {
    throw new Error('Function not implemented.');
  },
  hasAttribute: function (qualifiedName: string): boolean {
    throw new Error('Function not implemented.');
  },
  removeAttribute: function (qualifiedName: string): void {
    throw new Error('Function not implemented.');
  },
  setAttribute: function (qualifiedName: string, value: string): void {
    throw new Error('Function not implemented.');
  },
  getAttributeNS: function (namespace: string | null, localName: string): string | null {
    throw new Error('Function not implemented.');
  },
  hasAttributeNS: function (namespace: string | null, localName: string): boolean {
    throw new Error('Function not implemented.');
  },
  removeAttributeNS: function (namespace: string | null, localName: string): void {
    throw new Error('Function not implemented.');
  },
  setAttributeNS: function (namespace: string | null, qualifiedName: string, value: string): void {
    throw new Error('Function not implemented.');
  },

  getAttributeNode: function (qualifiedName: string): Attr | null {
    throw new Error('Function not implemented.');
  },
  removeAttributeNode: function (attr: Attr): Attr {
    throw new Error('Function not implemented.');
  },
  setAttributeNode: function (attr: Attr): Attr | null {
    throw new Error('Function not implemented.');
  },
  getAttributeNodeNS: function (namespace: string | null, localName: string): Attr | null {
    throw new Error('Function not implemented.');
  },
  setAttributeNodeNS: function (attr: Attr): Attr | null {
    throw new Error('Function not implemented.');
  },
};

const done_htmlElement = {
  offsetWidth: 0,
  offsetHeight: 0,
  offsetParent: null,
  offsetLeft: 0,
  offsetTop: 0,

  innerText: '',
  outerText: '',
};
